package com.mayflygeek.mayflyask.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
 * @author 蝈蝈 
 * @email guodefu909@126.com
 * @team 蜉蝣极客
 * @link www.mayflygeek.com
 * 邮件基本信息类
 */
@Component
public class MailConfigInfo {
	
	// 发送邮件的服务器的IP(或主机地址)
	@Value(value="${mail.smtp.host}")
	private String mailServerHost;
	
	// 发送邮件的服务器的端口
	@Value(value="${mail.smtp.port}")
	private String mailServerPort = "25";
	
	// 登陆邮件发送服务器的用户名
	@Value(value="${mail.sender.username}")
	private String userName;
	
	// 登陆邮件发送服务器的密码
	@Value(value="${mail.sender.password}")
	private String password;
	
	// 是否需要身份验证
	@Value(value="${mail.smtp.auth}")
	private boolean validate = false;
	
	// 发件人邮箱地址
	@Value(value="${mail.sender.username}")
	private String fromAddress;
	
	// 发件人
	@Value(value="${mail.info.logo}")
	private String fromUserName;
	
	// 邮箱链接超时时间
	@Value(value="${mail.smtp.timeout}")
	private String connectionTimeout;
	
	// 邮件发送超时时间
	@Value(value="${mail.smtp.timeout}")
	private String timeout;
	
	
	
	public String getMailServerHost() {
		return mailServerHost;
	}

	public void setMailServerHost(String mailServerHost) {
		this.mailServerHost = mailServerHost;
	}

	public String getMailServerPort() {
		return mailServerPort;
	}

	public void setMailServerPort(String mailServerPort) {
		this.mailServerPort = mailServerPort;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isValidate() {
		return validate;
	}

	public void setValidate(boolean validate) {
		this.validate = validate;
	}

	public String getFromAddress() {
		return fromAddress;
	}

	public void setFromAddress(String fromAddress) {
		this.fromAddress = fromAddress;
	}

	public String getFromUserName() {
		return fromUserName;
	}

	public void setFromUserName(String fromUserName) {
		this.fromUserName = fromUserName;
	}

	public String getConnectionTimeout() {
		return connectionTimeout;
	}

	public void setConnectionTimeout(String connectionTimeout) {
		this.connectionTimeout = connectionTimeout;
	}

	public String getTimeout() {
		return timeout;
	}

	public void setTimeout(String timeout) {
		this.timeout = timeout;
	}

}